<template>
	<view class="">
		<view class="calc150 overauto h498 bgcontain no-repeat"
			:style="{ backgroundImage: 'url(' + cosImageUrl('head_bg.png',true) + ')' }">
			<view class="" :style="{'paddingTop':statusBarHeigh + 'px',}">
				<view class="flex alicen pl20" :style="{'height':menuButtonInfo.height + 'px',}"></view>
			</view>
			<!-- 主体内容 -->
			<view class="pl20 pr20">
				<view class="flex alicen">
					<image class="w120 h120 ius100" :src="cosImageUrl('avatar.png',true)" mode="aspectFill"></image>
					<view class="ml20">
						<view class="flex alicen">
							<view class="mr10 fz32 bold" v-if="readData('userdata').phone">
								{{readData('userdata').phone}}
							</view>
							<image class="w120 h60" v-if="sfvip" :src="cosImageUrl('vip1.png',true)" mode="aspectFit"></image>
							<!-- <image :src="cosImageUrl('vip2.png',true)" mode="aspectFill"></image> -->
						</view>
						<view class="fz28 col00" v-if="readData('userdata').id">ID:{{readData('userdata').id}}</view>
					</view>
				</view>
				<!-- 开通超级会员 -->
				<image class="w100b h180 ius10" v-if="showVip" :src="cosImageUrl('openvip.png',true)" mode="aspectFill"
					@click="navgateTo('/pages/openvip/openvip')"></image>
				<view class="pb20"></view>
				<view class="bgfff ius20 pt20 pl20 pb20 pr20">
					<view class="">
						<view class="flex alicen between bdr1_bottom boree pb30 pt30" @click="infoPop = true">
							<view class="flex alicen">
								<image class="w40 h40" :src="cosImageUrl('myinfo.png',true)" mode="aspectFill"></image>
								<view class="ml20">我的信息</view>
							</view>
							<u-icon name="arrow-right" size="15" color="#ededed"></u-icon>
						</view>
						<view class="flex alicen between bdr1_bottom boree pb30 pt30"
							@tap="navgateTo('/pages/mine/favorite')">
							<view class="flex alicen">
								<image class="w40 h40" :src="cosImageUrl('collect.png',true)" mode="aspectFill"></image>
								<view class="ml20">我的收藏</view>
							</view>
							<u-icon name="arrow-right" size="15" color="#ededed"></u-icon>
						</view>
						<!--
						<view class="flex alicen between bdr1_bottom boree pb30 pt30">
							<view class="flex alicen">
								<image class="w40 h40" :src="cosImageUrl('service.png',true)" mode="aspectFill"></image>
								<view class="ml20">联系客服</view>
							</view>
							<u-icon name="arrow-right" size="15" color="#ededed"></u-icon>
						</view>
						-->
					</view>
				</view>
				<view class="pb30"></view>
				<!--
				<view class="flexCenter pt20 pb20 fz30 bold ius20 bgfff"  @click="lonoutAndReg()">注册我的账号</view>
				<view class="pb40"></view>
				-->
				<view class="flexCenter pt20 pb20 fz30 bold ius20 bgfff"  @click="lonout()">退出</view>
				
				
				
			</view>
		</view>
		<view class="pl20 pr20 ml30 mr30">
			<com-myInfo :infoPop="infoPop" @updates="infoPop = false"></com-myInfo>
		</view>
		<com-tabbar></com-tabbar>

	</view>
</template>

<script>
	import {miniLogin} from "@/utils/api/user.js"
	import jwx from '../../utils/jwx.js'
	export default {
		data() {
			return {
				showVip:true,
				infoPop: false,
				sfvip:0,
				showReg:false,
			}
		},
		async onLoad() {
		  let that = this;
		  
		  
		  
		  if(this.readData('useId')=="1927183845081636864"){
			  this.clearData();
			  this.navLaunch('/pages/login/login');
		  }
		
		  let params = {
		    useId: this.readData('useId')
		  }
		  let users = await this.request.get('/api/loginMemberById', {
		    params
		  })
		  this.sfvip = users.data.sfvip;
		  let phone=users.data.phone;
		  if(phone=="18677191111"){
			  this.showReg=true;
		  }
		},
		methods: {
			lonout() {
				this.clearData();
				this.navLaunch('/pages/login/login');
			},
			lonoutAndReg() {
				this.clearData();
				this.navLaunch('/pages/applyRecommend/applyRecommend');
			}
		}

	}
</script>

<style lang="scss">
	page {
		background-color: #ededed;
	}
	.calc150{height: calc(100vh - 150rpx)}
</style>